<?php

class Transition extends AppModel{
    var $useTable = 'transitions';
    var $name = 'Transition';

    var $belongsTo = array(
        'CurrentState' => array(
            'className' => 'State',
            'foreignKey' => 'current_state_id'
        ),
        'NextState' => array(
            'className' => 'State',
            'foreignKey' => 'next_state_id'
        ),
        'Event' => array(
            'className' => 'Event',
            'foreignKey' => 'event_id'
        ),
        'Workflow' => array(
            'className' => 'Workflow',
            'foreignKey' => 'workflow_id'
        )
    );

    var $hasMany = array(
        'Action' => array(
            'className' => 'ActionMapping',
            'foreignKey' => 'transition_id'
        )
    );
}

?>
